const fetch = require('node-fetch');


function MempoolAPI() {
    let self = this;
}

MempoolAPI.prototype.getAddressTxs = async function (address) {
    let self = this;
    let url = `https://mempool.space/api/address/${address}/txs`;
    // console.log(`getAddressTxs url = ${url}`);
    const response = await fetch(url, {
        method: 'GET',
      });
      let res = await response.json();
      return res;
}

module.exports = MempoolAPI;

